#if !defined(AFX_LISTCTRLIPACCESSSTATESSHOW_H__EF68738C_113C_499A_B879_CFDEEB46E49D__INCLUDED_)
#define AFX_LISTCTRLIPACCESSSTATESSHOW_H__EF68738C_113C_499A_B879_CFDEEB46E49D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListCtrlGatewayStatesShow.h : header file
//

#include "ListCtrlData.h"
#include "CopyableMap.h"
#include "AccessIPs.h"

/////////////////////////////////////////////////////////////////////////////
// CListCtrlIpAccessStatesShow window

class CListCtrlIpAccessStatesShow : public CListCtrlData
{
// Construction
public:
	enum EStateType
	{
		ST_SHOWSTATE	= 0,
		ST_SHOWIP	= 1
	};
	CListCtrlIpAccessStatesShow(const EStateType &eStateType =ST_SHOWSTATE);
	virtual ~CListCtrlIpAccessStatesShow();
	enum ERadiusIpColIndex
	{
		COLNO_RADIUS_IP	= 0
	};

// Attributes
public:
	enum EIpAccessState
	{
		NO_ADMITTANCE	= 1,
		ADMITTANCE		= 2
	};
	CCopyableMap<CString,LPCTSTR,CCopyableMap<CString,LPCTSTR,EIpAccessState,EIpAccessState>,CCopyableMap<CString,LPCTSTR,EIpAccessState,EIpAccessState>&> m_mapIpAccessStatesGroups;
	CCopyableMap<CString,LPCTSTR,CAccessIPs::CProperty,CAccessIPs::CProperty&> &m_mapRadiusIPs;
	int m_iRadiusIpColIndex;
protected:
	EStateType m_eStateType;

	CImageList m_imglstAccessStates;
	CMap<EIpAccessState,EIpAccessState,int,int&> m_mapStateToImageindex;
	CMap<EIpAccessState,EIpAccessState,CString,LPCTSTR> m_mapStateToString;

// suspend:delete
// 	CMap<CString,LPCTSTR,int,int&> m_mapGatewayToIndex;
	CMap<DWORD,DWORD,CString,LPCTSTR> m_mapItemToRadiusIP;

	CMap<int,int&,CString,LPCTSTR> m_mapColumnSubItemToGroupName;
	CMap<CString,LPCTSTR,int,int&> m_mapGroupNameToSubItem;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CListCtrlIpAccessStatesShow)
protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	void AddGroup(const CString &strGroupName, const CString &strAdmittances);
protected:
	void SetState(int iItem, int iSubItem);

	// Generated message map functions
protected:
	//{{AFX_MSG(CListCtrlIpAccessStatesShow)
	afx_msg void OnItemchanging(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDrawIpAccessStateItem( NMHDR *pNmHdr, LRESULT *pResult );
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LISTCTRLIPACCESSSTATESSHOW_H__EF68738C_113C_499A_B879_CFDEEB46E49D__INCLUDED_)
